﻿using System;
using Enyim.Caching;
using Ayatta.Contract;
using System.Web.Mvc;
using Web.Core.Security;
using Web.My.Models;

namespace Web.My.Controllers
{
    public class HomeController : BaseController
    {

        public HomeController(Lazy<IInfrastructureService> infrastructure, Lazy<IPassportService> passport, Lazy<IAccountService> account, Lazy<IStoreService> store, Lazy<ITradeService> trade, Lazy<IPlayService> play, Lazy<IMiscService> misc, Lazy<IExtraService> extra, IMemcachedClient memcachedClient)
            : base(infrastructure, passport, account, store, trade, play, misc, extra, memcachedClient)
        {
        }

        /// <summary>
        /// 个人中心首页
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            var model = new HomeControllerModel.Index();
            var identity = User.Identity.Identity();
            model.User = Passport.Value.UserGet(identity.Id);

            return View(model);
        }

    }
}
